package com.daogu.fuelcard.config;

import com.daogu.fuelcard.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
@RestControllerAdvice
public class GlobalExceptionConfig {

    @ExceptionHandler({Exception.class})
    public Result exceptionMethod(Exception e) {
        return Result.error(e.toString());
    }

}
